<style>    
    #testFileInput2{
        height: 30px; width: 102px; margin-left: 128px;
    }
    #preview1, #topPhpto
        {  
            width:150px;  
            padding-left: 65px;padding-top: 15px; border-top-width: 5px;
            //height:150px;  
        }
    #preview2, #topPhpto2{
        width:150px;
        margin-left: 65px;
    }
    .uploadify-button-text{
        width: 100px;
    }
    #testFileInput3-button {
        height: 30px; line-height: 30px; width: 120px; margin-left: 130px;
    }
</style>
<div class="pageContent">	
    <form method="post" action="__CONTROLLER__/myedit?callbackType=closeCurrent" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
        <input type="hidden" value="<{$Think.session.companyName}>" name="sessionCompany">
        <input type="hidden" name="license" id="license" value="<{$my.license}>"/>
        <input type="hidden" name="icon" id="icon" value="<{$my.icon}>">
        <div class="pageFormContent" layoutH="58">
            <div class="unit">
                <label>公司名称：</label>
                <input type="text" name="companyName" size="15"  value="<{$my.companyname}>" />
            </div>
            <div class="unit">
                <label>昵称：</label>
                <input type="text" name="nickName" size="15"  value="<{$my.nickname}>"/>
            </div>
            <div class="unit">
                <label>电话：</label>
                <input type="text" name="tel" size="15"  value="<{$my.tel}>" class='required <neq name="my.tel" value="">readonly</neq>' />
            </div>
            <div class="unit">
                <label>地区：</label>
                <select class="combox" name="province" ref="w_combox_city" refUrl="__MODULE__/Area/ajaxShowCity/id/{value}">
                    <option value="">所在省</option>
                    <foreach name="provinceData" item="item" >
                        <option <eq name="areaInfo['province']" value="$item['province']">selected</eq> value="<{$item.id}>"><{$item.province}></option>
                    </foreach>
                </select>
                <select class="combox" name="city" id="w_combox_city" ref="w_combox_region" refUrl="__MODULE__/Area/ajaxShowArea/id/{value}">
                    <option value="">所在城市</option>
                    <neq name='cityData' value=''>
                        <foreach name="cityData" item="item" >
                            <option value="<{$item.id}>" <eq name="areaInfo['city']" value="$item['city']">selected</eq>><{$item.city}></option>
                        </foreach>
                    </neq>
                </select>
            </div>
            <div class="unit">
                <label>公司网址：</label>
                <input type="text" name="websit" size="15"  value="<{$my.websit}>" class='' />
            </div>            
            <div class="unit">
                <label>公司简介：</label>
                <textarea name="addroduction" rows="10" cols="40"><{$my.addroduction}></textarea>
            </div>
            <div class="unit">
                <label>性别：</label>
                <input type="radio" name="sex" value="1" <eq name="my.sex" value="1">checked</eq>/>男
                <input type="radio" name="sex" value="2" <eq name="my.sex" value="2">checked</eq>/>女
            </div>
            <div id="preview1" href="">               
                <neq name="my['icon']" value=''>
                    <img src="<{$Think.const.PUBLIC_URL}>upload/<{$my.icon}>" id='topPhpto'/>
                <else/>
                    <img src="<{$Think.const.PUBLIC_URL}>Images/hzw.jpg"/>
                </neq>
            </div>
            <div class="unit">
                <label>LOGO：</label>  
                <input id="testFileInput2" type="file" name="icon"                                        
                    uploaderOption="{
			swf:'<{$Think.const.DWZ_URL}>uploadify/scripts/uploadify.swf',
			uploader:'__CONTROLLER__/upyyzz',
                        formData:{authId:<?php echo $_SESSION['authId'];?>, ajax:1},
			buttonText:'请选择文件',
			fileSizeLimit:'20000KB',
			fileTypeDesc:'*.jpg;*.jpeg;*.gif;*.png;',
			fileTypeExts:'*.jpg;*.jpeg;*.gif;*.png;',
			auto:true,
                        onUploadSuccess:function(file,data,respore){
                            $('#topPhpto').attr('src','<{$Think.const.PUBLIC_URL}>'+'upload/'+data);
                            $('#icon').val(data);
                        }
                    }"
                />
            </div>
            <div id="preview2" href="">
                <neq name="my['license']" value=''>
                    <img src="<{$Think.const.PUBLIC_URL}>upload/<{$my.license}>" id='topPhpto2'/>
                <else/>
                    <img src="<{$Think.const.IMG_URL}>Images/hzw.jpg"/>
                </neq>
            </div>
            <div class="unit">
                <label>营业执照：</label>  
                <input id="testFileInput3" type="file" name="icon"                                        
                    uploaderOption="{
			swf:'<{$Think.const.DWZ_URL}>uploadify/scripts/uploadify.swf',
			uploader:'__CONTROLLER__/upyyzz&uid=<?php echo $_SESSION['authId'];?>',
                        formData:{authId:<?php echo $_SESSION['authId'];?>, ajax:2},
			buttonText:'请选择文件',
			fileSizeLimit:'20000KB',
			fileTypeDesc:'*.jpg;*.jpeg;*.gif;*.png;',
			fileTypeExts:'*.jpg;*.jpeg;*.gif;*.png;',
			auto:true,
                        onUploadSuccess:function(file,data,respore){
                            $('#topPhpto2').attr('src','<{$Think.const.PUBLIC_URL}>'+'upload/'+data);
                            $('#license').val(data);
                        }
                    }"
                />
            </div>
        </div>
        <div class="formBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
                <li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
            </ul>
        </div>
    </form>	
</div>
<script>
    $(function(){
        $("input[name='companyName']").blur(function(){
            var sessionCompany  =$("input[name='sessionCompany']").val();
            var company         =$("input[name='companyName']").val();
            if(sessionCompany!=company){
                alert("修改公司名称将重新审核用户资质");
            }
        });
    });    
    
</script>
